package com.meshnetics.gb.util.formatters;

import com.meshnetics.gb.util.ByteBufferManager;
import com.meshnetics.gb.util.checkers.RangeCheckers;

import java.nio.ByteBuffer;

/**
 * @author Pavlov Dmitry dpavlov@meshnetics.com
 */
final class NumberFormatterUInt extends AbstractNumberFormatter {
    protected ByteBuffer getBuffer(final long value) {
        return ByteBufferManager.allocateBE(Integer.SIZE / Byte.SIZE).putInt((int) value);
    }

    protected void checkRange(final long value) {
        RangeCheckers.UINT.checkRange(value);
    }
    
}
